home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
9-Digit Zip Code Directory
/
9-Digit Zip Code Directory (American Business Information) (ABIZIP-12).ISO
/
z4src.zip
/
CLTHREAD.HPP
< prev
next >
Wrap
C/C++ Source or Header
|
1993-09-02
|
3KB
|
89 lines
//----------------------------------------------------------------------------
// MODULE DESCRIPTION
//
// Module: clthread.hpp
// Title: C++ Class Libraries
// Notice: John M. Weeder
// Copyright (c) 1993. All rights reserved.
// This module contains proprietary information and should be
// treated as confidential.
//
//----------------------------------------------------------------------------
// MAINTENANCE HISTORY
//
// $Workfile$
// $Revision$
// $Author$
// $Date$
// $Log$
//
//----------------------------------------------------------------------------
// MODULE NARRATIVE
//
// This module contains code for the class CL_THREAD.
//
// The code in this module may be written in C++ or C.
//
// This module is portable to:
// DOS 3.X+
// MS Windows 3.X+
// OS/2 2.X+
// OS/2 2.0 PM
//
// The following compilers are supported:
// MSC 6.0A
// MSC/C++ 7.0
// Borland C++ 3.1 for DOS
// Borland C++ 1.0 for OS/2 2.X
//
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
// Class CL_THREAD
//----------------------------------------------------------------------------
CLASSDEF(CL_THREAD);
#define CL_THREAD_PARENT CL_OBJECT
class CLASSTYPE CL_THREAD : public CL_THREAD_PARENT
{
TID tid; // Thread id
BOOL fActive; // Active flag
CL_EVENT event; // Event semaphore
public:
FN_M CL_THREAD();
FN_M CL_THREAD(RCCL_THREAD);
virtual FN_M ~CL_THREAD();
virtual BOOL FN_M Destroy(BOOL = TRUE);
virtual BOOL FN_M Initialize(SHORT = CL_INIT_ALL);
virtual BOOL FN_M IsActive() const
{
return fActive;
}
virtual BOOL FN_M IsError() const;
virtual BOOL FN_M IsValid() const;
RCCL_THREAD FN_M operator=(RCCL_THREAD);
virtual BOOL FN_M Retrieve(PCSZ, PCSZ = NULL);
BOOL FN_M Run();
virtual BOOL FN_M Store(PCSZ, PCSZ = NULL);
virtual VOID FN_M Thread() = 0;
TID FN_M Tid() const
{
return tid;
}
BOOL FN_M Wait(ULONG = -1);
#if COMPILE_DEBUG
static VOID FN_M Print(PCCL_THREAD = NULL, PCSZ = NULL, SIZET = 0);
static BOOL FN_M Test(SHORT = 0);
#endif
private:
static VOID FN_T ThreadFunc(PVOID);
};
//----------------------------------------------------------------------------
//------------------------------- End of File --------------------------------
//----------------------------------------------------------------------------